package com.qf.android.sport.entity.news;

import android.databinding.ObservableInt;
import android.support.v4.view.PagerAdapter;

import com.google.gson.annotations.Expose;
import com.qf.android.sport.BR;
import com.qf.android.sport.R;
import com.qf.android.sport.adapter.CommentPagerAdapter;

import java.util.List;

/**
 * Created by wuruyuan on 2016/12/20.
 */

public class Datas {
    private String  limit;
    private List<Tops> tops;
    private List<Banners> banners;
    @Expose(serialize = false,deserialize = false)
    private PagerAdapter adapter;
    @Expose(serialize = false, deserialize = false)
    private ObservableInt currenpage = new ObservableInt(0);

    private List<Contents> contents;
    private List<ContestList> contest_list;


    public String getLimit() {
        return limit;
    }

    public void setLimit(String limit) {
        this.limit = limit;
    }

    public List<Tops> getTops() {
        return tops;
    }

    public void setTops(List<Tops> tops) {
        this.tops = tops;
    }

    public List<Banners> getBanners() {
        return banners;
    }

    public void setBanners(List<Banners> banners) {
        this.banners = banners;
    }

    public List<Contents> getContents() {
        return contents;
    }

    public void setContents(List<Contents> contents) {
        this.contents = contents;
    }

    public List<ContestList> getContest_list() {
        return contest_list;
    }

    public void setContest_list(List<ContestList> contest_list) {
        this.contest_list = contest_list;
    }

    public ObservableInt getCurrenpage() {
        return currenpage;
    }

    public void setCurrenpage(ObservableInt currenpage) {
        this.currenpage = currenpage;
    }

    public PagerAdapter getAdapter() {
        if (adapter==null) {
            adapter=new CommentPagerAdapter<>(banners, R.layout.pager_image, BR.banner);
        }
        return adapter;
    }
}
